ruby:
	form_options = {
		html: {
			multipart: true,
			novalidate: true,
			class: 'js-file-form',
			remote: true,
			data: {
				type: "html",
				form_manager_model: @item.fae_form_manager_model_name,
				form_manager_info: (@form_manager.present? ? @form_manager.to_json : nil)
			}
		}
	}
= simple_form_for([:admin, @item], form_options) do |f|
<% @form_attrs.each do |attr| -%>
  = fae_input f, :<%= attr %>
<% end -%>
<% @attachments.each do |attachment| %>
<% if attachment.type == :image -%>
  = fae_image_form f, :<%= attachment.name -%>
<% elsif attachment.type == :file -%>
  = fae_file_form f, :<%= attachment.name -%>
<% elsif attachment.type == :cta -%>
  = fae_cta_form f, :<%= attachment.name -%>
<% end -%>
<% end -%>
<% if options.polymorphic %>
  = f.hidden_field :<%= @polymorphic_name %>_id
  = f.hidden_field :<%= @polymorphic_name %>_type
<% elsif options.parent_model.present? %>
  = f.hidden_field :<%= options.parent_model.underscore %>_id
<% end -%>

  = f.submit
  = button_tag 'Cancel', type: 'button', class: 'js-cancel-nested cancel-nested-button'

  - if Fae.use_form_manager
    a.button.js-launch-form-manager href='#' = t('fae.form.launch_form_manager')
